#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	double sum=1,t,b[1000]={0,1,2,3},a[1000]={0,1,1,2};
	cin>>n;//scanf("%d",&n); 
	for(int i=3;i<=n;i++)
	{
		a[i]=a[i-1]+a[i-2];
		b[i]=b[i-1]+b[i-2];
	}
	for(int i=2;i<=n;i++)
	{
		t=a[i]/b[i];
		i%2 == 0 ? sum -= t: sum += t;
	}
	cout<<fixed<<setprecision(4)<<sum;
    return 0;
}
